package org.zsqx.action;

import java.util.Map;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.interceptor.SessionAware;
import org.apache.struts2.util.ServletContextAware;

import cDao.CdaoFactory;
import cDao.RealDao;
import cDao.bean.PageBean;

import com.opensymphony.xwork2.ActionSupport;

public class BaseAction extends ActionSupport implements SessionAware, ServletRequestAware, ServletResponseAware,ServletContextAware  {
	public static final String SUCCESS = "操作成功！";
	public static final String FAIL  = "操作失败！";
	protected Map<String, Object> session;
	protected HttpServletRequest request;
	protected static HttpServletResponse response;
	protected ServletContext servletContext;
	protected RealDao rd = CdaoFactory.getRealDao();
	protected String message;
	protected String mainPage;
	protected PageBean pageBean;
	protected Integer currentPage;
	protected Integer pageSize = 20;
	public void setSession(Map<String, Object> arg0) {
		this.session = arg0;
	}
	public void setServletRequest(HttpServletRequest arg0) {
		this.request = arg0;
	}
	public void setServletResponse(HttpServletResponse arg0) {
		this.response = arg0;
	}
	public void setServletContext(ServletContext arg0) {
		this.servletContext = arg0;
	}
	public String getMainPage() {
		return mainPage;
	}
	public void setMainPage(String mainPage) {
		this.mainPage = mainPage;
	}
	public PageBean getPageBean() {
		return pageBean;
	}
	public void setPageBean(PageBean pageBean) {
		this.pageBean = pageBean;
	}
	public Integer getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	
}
